<table cellpadding="2" cellspacing="1">
<tr>
    <td>选项列表</td>
    <td><textarea name="setting[options]" rows="2" cols="20" id="options" style="height:100px;width:400px;"><?php echo $options?></textarea></td>
</tr>
<tr>
    <td>选项类型</td>
    <td>
        <input type="radio" name="setting[boxtype]" value="radio" <?php echo $boxtype == 'radio' ? 'checked' : ''?> checked onclick="$('#setcols').show();$('#setsize').hide();"/> 单选按钮 <br />
        <input type="radio" name="setting[boxtype]" value="checkbox" <?php echo $boxtype == 'checkbox' ? 'checked' : ''?> onclick="$('#setcols').show();$('#setsize').hide();"/> 复选框 <br />
        <input type="radio" name="setting[boxtype]" value="select" <?php echo $boxtype == 'select' ? 'checked' : ''?>  onclick="$('#setcols').hide();$('#setsize').show();" /> 下拉框 <br />
        <input type="radio" name="setting[boxtype]" value="multiple" <?php echo $boxtype == 'multiple' ? 'checked' : ''?> onclick="$('#setcols').hide();$('#setsize').show();" /> 多选列表框
    </td>
</tr>
<tbody id="setcols" <?php echo ($boxtype == 'radio' || $boxtype == 'checkbox') ? '' : 'style="display:none"'?>>
<tr>
    <td>字段类型</td>
    <td>
        <select name="setting[fieldtype]">
            <option value="CHAR" <?php echo isset($fieldtype) && $fieldtype == 'CHAR' ? 'selected' : ''?>>定长字符 CHAR</option>
            <option value="VARCHAR" <?php echo  isset($fieldtype) && $fieldtype == 'VARCHAR' ? 'selected' : ''?>>变长字符 VARCHAR</option>
            <option value="TINYINT" <?php echo  isset($fieldtype) && $fieldtype == 'TINYINT' ? 'selected' : ''?>>整数 TINYINT(3)</option>
            <option value="SMALLINT" <?php echo  isset($fieldtype) && $fieldtype == 'SMALLINT' ? 'selected' : ''?>>整数 SMALLINT(5)</option>
            <option value="MEDIUMINT" <?php echo  isset($fieldtype) && $fieldtype == 'MEDIUMINT' ? 'selected' : ''?>>整数 MEDIUMINT(8)</option>
            <option value="INT" <?php echo  isset($fieldtype) && $fieldtype == 'INT' ? 'selected' : ''?>>整数 INT(10)</option>
        </select>
    </td>
</tr>
<tr>
    <td>列数</td>
    <td><input type="text" name="setting[cols]" value="<?php echo isset($cols)?$cols:'' ?>" size="5" class="txt"> 每行显示的选项个数</td>
</tr>
<tr>
    <td>每列宽度</td>
    <td><input type="text" name="setting[width]" value="<?php echo isset($width)?$width:''?>" value="80" size="5" class="txt"> px</td>
</tr>
</tbody>
<tbody id="setsize" <?php echo ($boxtype == 'radio' || $boxtype == 'checkbox') ? 'style="display:none"' : ''?>>
<tr>
    <td>高度</td>
    <td><input type="text" name="setting[size]" value="<?php echo isset($size)?$size:'' ?>" size="5" class="txt"> 行</td>
</tr>
</tbody>
<tr>
  <td>默认值</td>
  <td><input type="text" name="setting[defaultvalue]"  value="<?php echo $defaultvalue?>" size="40" class="txt"></td>
</tr>
</table>